//
//  PopoverAnnotsController.m
//
//  Created by Alex Di Mango on 05/07/12.
//  Copyright (c) 2012 Whardoo.com - All rights reserved.
//

#import "PopoverAnnotsController.h"
@interface PopoverAnnotsController ()

@end

@implementation PopoverAnnotsController
@synthesize date,line,annots;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor]; 
    UIImageView *bg = DOCUMENTS_LINEN;
    [bg setContentMode:UIViewContentModeCenter];
    [self.view addSubview: bg];

    
    self.view.frame = CGRectMake(0, 0, 130.,130.);

    UILabel *dateL = [[UILabel alloc] initWithFrame:CGRectMake(10., 10., 110., 10.)];
	dateL.text = date;
    dateL.textColor = [UIColor whiteColor];
	dateL.font = [UIFont boldSystemFontOfSize:10.];
    dateL.backgroundColor = [UIColor clearColor];
	[self.view addSubview:dateL];
	[dateL release];
    
    UILabel *lineL = [[UILabel alloc] initWithFrame:CGRectMake(10., 20., 110., 1.)];
    lineL.backgroundColor = [UIColor whiteColor];;
	[self.view addSubview:lineL];
	[lineL release];
    
    
    UITextView *textL = [[UITextView alloc] initWithFrame:CGRectMake(10., 23., 110., 100.)];
	textL.editable = NO;
    textL.text = annots;
    textL.textColor = [UIColor whiteColor];
    textL.font = [UIFont systemFontOfSize:(12.)];
    textL.backgroundColor = [UIColor clearColor];
    [self.view addSubview:textL];
	[textL release];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}


#pragma mark -
#pragma mark Memory management

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

@end
